-
Notifications
You must be signed in to change notification settings - Fork 208
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add new endpoint giving simple rustdoc status for a version #2147
Conversation
0e9b8c3
to
469d0c9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for working on this!
469d0c9
to
8b388a7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Last two comments ;)
9b451e0
to
7d0c82f
Compare
@Nemo157 after manually testing, I saw one thing: we do seem to follow semver logic, so a request to Seeing the two use-cases I can imagine:
Perhaps I'm missing another case? for the crates.io case I could imagine some edge-cases where the status for a version would be returned that crates.io didn't request. Though this could currently only happen when we're missing a version that is not the latest of that semver bracket. Would crates.io check the returned version? Or should we perhaps return a redirect similar to the builds.json endpoint? ( crates.io would need to ignore that one too then). |
Huh, interesting, likely the only reason that crates.io doesn't make that mistake right now is that the redirect is lacking a CORS header. Testing on https://crates.io/crates/stylish-core/0.1.0 (which isn't on docs.rs because of weird reasons around cyclic dependencies, but 0.1.1 is):
I could make it only support exact or |
Sleeping over it, expecting the latter sounds like a valid approach. That means the only remaining question (for me, right now) seems to be: so we want consistency with the other pages, and the |
@kornelski given lib.rs' source has gone private, would you be able to migrate to this new API? |
As discussed in #2144, this adds a new endpoint for simply requesting whether docs are available for a specific version, without exposing other details about our builds.
I've also fixed the metrics recording
/builds.json
requests as being "static resource" stopping us from being able to see how many requests we get, that will let us verify whether there's any other clients hitting that endpoint once shields.io/crates.io/lib.rs have migrated over.